<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>error</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/androguard/">Androguard</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Module&nbsp;error
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="error-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="error-module.html">Module error</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment"># from scapy</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable error.log_andro=error-module.html#log_andro"><a title="error.log_andro" class="py-name" href="#" onclick="return doclink('link-0', 'log_andro', 'link-0');">log_andro</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"andro"</tt><tt class="py-op">)</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable error.console_handler=error-module.html#console_handler"><a title="error.console_handler" class="py-name" href="#" onclick="return doclink('link-1', 'console_handler', 'link-1');">console_handler</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">StreamHandler</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt id="link-2" class="py-name"><a title="error.console_handler" class="py-name" href="#" onclick="return doclink('link-2', 'console_handler', 'link-1');">console_handler</a></tt><tt class="py-op">.</tt><tt class="py-name">setFormatter</tt><tt class="py-op">(</tt><tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">Formatter</tt><tt class="py-op">(</tt><tt class="py-string">"%(levelname)s: %(message)s"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt id="link-3" class="py-name"><a title="error.log_andro" class="py-name" href="#" onclick="return doclink('link-3', 'log_andro', 'link-0');">log_andro</a></tt><tt class="py-op">.</tt><tt class="py-name">addHandler</tt><tt class="py-op">(</tt><tt id="link-4" class="py-name"><a title="error.console_handler" class="py-name" href="#" onclick="return doclink('link-4', 'console_handler', 'link-1');">console_handler</a></tt><tt class="py-op">)</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable error.log_runtime=error-module.html#log_runtime"><a title="error.log_runtime" class="py-name" href="#" onclick="return doclink('link-5', 'log_runtime', 'link-5');">log_runtime</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"andro.runtime"</tt><tt class="py-op">)</tt>          <tt class="py-comment"># logs at runtime</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable error.log_interactive=error-module.html#log_interactive"><a title="error.log_interactive" class="py-name" href="#" onclick="return doclink('link-6', 'log_interactive', 'link-6');">log_interactive</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"andro.interactive"</tt><tt class="py-op">)</tt>  <tt class="py-comment"># logs in interactive functions</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable error.log_loading=error-module.html#log_loading"><a title="error.log_loading" class="py-name" href="#" onclick="return doclink('link-7', 'log_loading', 'link-7');">log_loading</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"andro.loading"</tt><tt class="py-op">)</tt>          <tt class="py-comment"># logs when loading andro</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"> </tt>
<a name="set_debug"></a><div id="set_debug-def"><a name="L12"></a><tt class="py-lineno">12</tt> <a class="py-toggle" href="#" id="set_debug-toggle" onclick="return toggle('set_debug');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="error-module.html#set_debug">set_debug</a><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> </tt>
</div><div id="set_debug-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="set_debug-expanded"><a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line">    <tt id="link-8" class="py-name"><a title="error.log_andro" class="py-name" href="#" onclick="return doclink('link-8', 'log_andro', 'link-0');">log_andro</a></tt><tt class="py-op">.</tt><tt class="py-name">setLevel</tt><tt class="py-op">(</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">DEBUG</tt> <tt class="py-op">)</tt> </tt>
</div><a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"> </tt>
<a name="get_debug"></a><div id="get_debug-def"><a name="L15"></a><tt class="py-lineno">15</tt> <a class="py-toggle" href="#" id="get_debug-toggle" onclick="return toggle('get_debug');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="error-module.html#get_debug">get_debug</a><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> </tt>
</div><div id="get_debug-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="get_debug-expanded"><a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-9" class="py-name"><a title="error.log_andro" class="py-name" href="#" onclick="return doclink('link-9', 'log_andro', 'link-0');">log_andro</a></tt><tt class="py-op">.</tt><tt class="py-name">getEffectiveLevel</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">DEBUG</tt> </tt>
</div><a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"> </tt>
<a name="warning"></a><div id="warning-def"><a name="L18"></a><tt class="py-lineno">18</tt> <a class="py-toggle" href="#" id="warning-toggle" onclick="return toggle('warning');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="error-module.html#warning">warning</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="warning-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="warning-expanded"><a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line">    <tt id="link-10" class="py-name"><a title="error.log_runtime" class="py-name" href="#" onclick="return doclink('link-10', 'log_runtime', 'link-5');">log_runtime</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Function error.warning()=error-module.html#warning"><a title="error.warning" class="py-name" href="#" onclick="return doclink('link-11', 'warning', 'link-11');">warning</a></tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
</div><a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"> </tt>
<a name="error"></a><div id="error-def"><a name="L21"></a><tt class="py-lineno">21</tt> <a class="py-toggle" href="#" id="error-toggle" onclick="return toggle('error');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="error-module.html#error">error</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> </tt>
</div><div id="error-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="error-expanded"><a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line">    <tt id="link-12" class="py-name"><a title="error.log_runtime" class="py-name" href="#" onclick="return doclink('link-12', 'log_runtime', 'link-5');">log_runtime</a></tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Module error=error-module.html,Function error.error()=error-module.html#error"><a title="error
error.error" class="py-name" href="#" onclick="return doclink('link-13', 'error', 'link-13');">error</a></tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line">    <tt class="py-keyword">raise</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line"> </tt>
<a name="debug"></a><div id="debug-def"><a name="L25"></a><tt class="py-lineno">25</tt> <a class="py-toggle" href="#" id="debug-toggle" onclick="return toggle('debug');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="error-module.html#debug">debug</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> </tt>
</div><div id="debug-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="debug-expanded"><a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line">    <tt id="link-14" class="py-name"><a title="error.log_runtime" class="py-name" href="#" onclick="return doclink('link-14', 'log_runtime', 'link-5');">log_runtime</a></tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Function error.debug()=error-module.html#debug"><a title="error.debug" class="py-name" href="#" onclick="return doclink('link-15', 'debug', 'link-15');">debug</a></tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
</div><a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/androguard/">Androguard</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed May 18 15:57:05 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
